package com.sample.snl.frontend.LexicalAnalysis;

public class InAssignState extends State {
    Automaton automaton;

    public InAssignState(Automaton a) {
        this.automaton = a;
    }

    @Override
    void HandleCharacter(int ch) {
        if (ch == '=') {
            automaton.token = new Token(LexicalAnalyser.line, LexicalAnalyser.column, TokenType.ASSIGN, automaton.stringBuilder.toString());
            //LexicalAnalyser.LOG.debug("Recognized Token:" + automaton.token);
            automaton.gotToken = true;
        } else {
            automaton.setState(automaton.ErrorState);
        }
    }
}
